package com.project.thisDatabase.redis;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.listener.KeyExpirationEventMessageListener;
import org.springframework.data.redis.listener.RedisMessageListenerContainer;
import org.springframework.stereotype.Component;

@ConditionalOnProperty(name = "spring.data.redis.listener", havingValue = "true")
@Component
public class RedisExpiredListener extends KeyExpirationEventMessageListener {

    public RedisExpiredListener(RedisMessageListenerContainer listenerContainer) {
        super(listenerContainer);
        System.out.println("start redis listener: " + listenerContainer);
    }
}
